param(
    [string]$Version
)

$Root = Split-Path -Path $PSScriptRoot;

$Dir = "${env:GOPATH}\pkg\mod\gitee.com\hailib\mytree@${Version}"
if( -not ( Test-Path -Path $Dir ) ){
    $Tmp = New-Item -Path $Dir -ItemType Directory
}

Write-Host "copy to: ${Dir}"
Copy-Item -Path "${ROOT}\*" -Destination $Dir -Recurse -Exclude "${Root}\.vscode","${Root}\asset","${Root}\bin","${Root}\cmd","${Root}\conf","${Root}\logs","${Root}\cover.out";
